package mushystuff.dtb.core.service.to;

import java.util.Collection;

import mushystuff.dtb.core.model.PersistableBean;

public interface AssemblerService {

    public <B extends PersistableBean> B fromTO(Class<B> toClass, TransferObject to)
            throws AssemblerServiceException;

    public <T extends TransferObject> T toTO(Class<T> toClass, PersistableBean bean)
            throws AssemblerServiceException; 

    public <T extends TransferObject> T[] toTOArray(Class<T> toClass,
	    Collection<? extends PersistableBean> beans) throws AssemblerServiceException;

    public <B extends PersistableBean> Collection<B> fromTOCollection(Class<B> toClass, TransferObject[] tos)
            throws AssemblerServiceException;

}